
import { employeeListAll } from "@/api/employee";

export async function dialogsFunc() {
    const { data = [] } = await employeeListAll()
    const selects = data.map(item => {
        return {
            label: item.user_name,
            value: `${item.user_name},${item.user_no}`
        }
    })

    return {
        fields: [
            {
                el: 'iv-select',
                label: '职工',
                value: 'user',
                rule: { required: true },
                option: {
                    selects
                }
            },
            {
                el: 'iv-date-picker',
                label: '上班时间',
                value: 'start_work_time',
                option: {
                    type: 'date',
                }
            }
        ]
    }
}